// 格式化时间 yyyy-mm-dd
function formatter(time){
	 var timeStr = String(time);
     var da = new Date(parseInt(timeStr.replace("/Date(", "").replace(")/" , "").split( "+")[0]));
     var year = da.getFullYear();
     var month =da.getMonth() + 1;
     if(month<10)
     month ="0"+month;
     var date = da.getDate();
     if(date<10)
     date ="0"+date;
     return year+"-"+month+"-"+date;
}

//格式化时间 yyyy-mm-dd H:M:S
function formatterHMS(time){
	 var timeStr = String(time);
	 var da = new Date(parseInt(timeStr.replace("/Date(", "").replace(")/" , "").split( "+")[0]));
	 return da.getFullYear() + "-" + (da.getMonth() + 1) + "-" + da.getDate() + " " + da.getHours() + ":" + da.getMinutes() + ":" + da.getSeconds();
}


//格式化时间 yyyy-mm-dd HH:MM:SS
var formatDateTime = function (time) { 
	var timeStr = String(time);
	 var date = new Date(parseInt(timeStr.replace("/Date(", "").replace(")/" , "").split( "+")[0]));
    var y = date.getFullYear();  
    var m = date.getMonth() + 1;  
    m = m < 10 ? ('0' + m) : m;  
    var d = date.getDate();  
    d = d < 10 ? ('0' + d) : d;  
    var h = date.getHours();  
    h = h < 10 ? ('0' + h) : h; 
    var minute = date.getMinutes();  
    minute = minute < 10 ? ('0' + minute) : minute;  
    var second = date.getSeconds();
    second = second < 10 ? ('0' + second) : second;  
    return y + '-' + m + '-' + d+' '+h+':'+minute+':'+second;  
};